const router = require('koa-router')(),
    essayController = require('../controller/essay'),
    loginCheck = require('../middlewares/logincheck');
router.prefix('/essay');
router.post('/get_essay', essayController.getEssay);
router.post('/create_essay', loginCheck, essayController.createEssay);
router.post('/destroy_essay', loginCheck, essayController.destroyEssay);
router.post('/update_essay', loginCheck, essayController.updateEssay);
router.post('/change_status_essay',loginCheck, essayController.changeStatusEssay);
router.post('/upload_image',loginCheck, essayController.uploadImage);
router.get('/get_essay_count', essayController.getEssayCount);
router.get('/get_essay_all', essayController.getEssayAll);
router.post('/get_essay_up', essayController.getEssayUp);
router.post('/get_essay_type', essayController.getEssayType);
module.exports = router; 